package news.service;

import news.dao.NewDao;
import news.dao.NewDaoImpl;
import news.mdel.New;
import util.PageModel;

import java.util.List;

public class NewServiceImpl implements NewService{

    NewDao newDao = new NewDaoImpl();
    @Override
    public List<New> selectByPage(PageModel pageModel) {
        return newDao.selectByPage(pageModel);
    }

    @Override
    public int deleteOne(Integer newid) {
        return newDao.deleteOne(newid);
    }

    @Override
    public int saveOne(New new1) {
        return newDao.saveOne(new1);
    }

    public New selectById(Integer newId){
        return newDao.selectById(newId);
    }


}
